//
//  AutherResultsViewModel.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/6.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "AutherResultsViewModel.h"

@implementation AutherResultsViewModel

-(instancetype)initWithViewToViewScrollView:(UIScrollView *)scrollView theSuperView:(UIView *)superView{
    if (self = [super initWithViewToViewScrollView:scrollView theSuperView:superView]) {
        scrollView.y = scrollView.y+kHeightProportion_In_iPhoneTriploid(10);
        scrollView.height = scrollView.height - kHeightProportion_In_iPhoneTriploid(10);
        [superView addSubview:scrollView];
        //
        GLGWImageView * topImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake((KScreenWidth - kWidthProportion_In_iPhoneTriploid(60))/2, kHeightProportion_In_iPhoneTriploid(20), kWidthProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(60)) inSuperView:scrollView];
        topImageView.backgroundColor = kRandomColor;
        //
        GLGWLabel * weiteLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(0, kY_With_View(topImageView, 20), KScreenWidth, kHeightProportion_In_iPhoneTriploid(22)) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:scrollView];
        weiteLabel.text = @"等待处理";
        weiteLabel.textAlignment = NSTextAlignmentCenter;
        //
        GLGWLabel * tosLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(0, kY_With_View(weiteLabel, 10), KScreenWidth, kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:scrollView];
        tosLabel.text = @"已提交认证申请，稍等一下客服马上处理~";
        tosLabel.textAlignment = NSTextAlignmentCenter;
        //
        GLGWButton * pushRootBut = [[GLGWButton alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kY_With_View(tosLabel, 60), KScreenWidth - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(44)) hTitle:@"先去首页看看吧" titleLableFont:SYSTEMFONT(16) titleLableColor:[UIColor whiteColor] theCornerRadius:kHeightProportion_In_iPhoneTriploid(22) backgroundColr:kColor_Rule_Yellow inSuperView:scrollView];
        [pushRootBut addTarget:self action:@selector(pushRootAction) forControlEvents:UIControlEventTouchUpInside];
        scrollView.contentSize = CGSizeMake(KScreenWidth, kY_With_View(pushRootBut, 10));
    }
    return self;
}

-(void)pushRootAction{
    if (self.Block_PushRootAction) {
        self.Block_PushRootAction();
    }
}

@end
